Message Broker Clouds

When MPX-enabled server configurations are used by clients that reside in different geographic locations, multiple Message Brokers may need to be deployed and configured to forward messages to one another. Such a configuration is called a “Message Broker cloud”.

Understanding Clouds

The cloud allows a subscriber to use ActiveMQ MPX features with server configurations that reside in another geographic location.

When a Message Broker receives a forwarded message from another Message Broker, it does the following:

  • Delivers the messages to the subscribers that are connected directly to it.

  • Forwards the messages to other Message Brokers that require the message.

The following shows an example of a Message Broker cloud. Some components in the ActiveMQ MPX architecture are omitted for simplicity.

Back to top

Message Broker Communication

A Message Broker can establish communication with another Message Broker by:

  • Initiating the communication with another Message Broker during its startup procedure.
  • Being contacted by another Message Broker when that Message Broker starts.

Each Message Broker has its own STMessageBroker68.ini configuration file located in the same folder as the executable STMessageBroker68.exe. The optional server_names parameter in the STMessageBroker68.ini file identifies other Message Brokers in the Message Broker cloud.

Each Message Broker has its own ActiveMQMessageBroker.ini configuration file located in C:\Program Files\Micro Focus\ActiveMQ Message Broker\conf. The ActiveMQMessageBroker.ini file provides the basic configuration options required to start a broker or setup a network of brokers. ActiveMQ MPX internally uses an xml configuration file activemq.xml which can be edited to use the advanced features. For information on configuring activemq.xml, refer to http://activemq.apache.org/xml-configuration.html.

When a Message Broker first starts, it reads the ActiveMQMessageBroker.ini file and attempts to connect with each of the Message Brokers listed in server_names list. If any of these Message Brokers is not running or cannot be reached when contact is attempted, communication is not established with that Message Broker. However, each Message Broker will retry the connection periodically.

Back to top

Message Routing in Message Broker Clouds

When a subscriber first connects to an MPX-enabled server configuration, it uses a connection profile to determine which Message Broker to use. If the subscriber opens another view on the same server configuration, it reuses the same Message Broker connection. If the subscriber opens a view on a different server configuration, it will again use the same Message Broker connection if the default or selected MPX profile for that server specifies the same Message Broker. However, if the default or selected MPX profile for the new server configuration specifies a different Message Broker, the subscriber will open a new connection to it. This means that a subscriber could have multiple Message Broker connections. Each message broadcast by an MPX-enabled server configuration is automatically forwarded to every Message Broker that has a connected subscriber interested in that message.

For example, in the following figure, the client has two open projects that are located on two different MPX-enabled server configurations. When a user opens Project 1 on StarTeam Server 1, the StarTeam Cross-Platform Client chooses a connection profile for Message Broker 1.

When the user opens Project 2 on StarTeam Server 2, assume that the client has selected an MPX profile that also specifies Message Broker 1. The client sends a subscribe message to Message Broker 1 registering its interest in messages regarding Project 2. Thereafter, StarTeam Server 2 sends all messages pertaining to Project 2 to Message Broker 2, which forwards them to Message Broker 1, and finally to the client. Even if the user closes Project 1 and, therefore, its connection to StarTeam Server 1, it continues to receive messages through Message Broker 1 during the client session.

Back to top

Routing in Unconnected Message Broker Clouds

In a properly configured Message Broker cloud, messages from all server configurations to which the subscriber is connected are routed to the appropriate Message Broker for that subscriber. However, in unconnected clouds, not all Message Brokers are aware of other Message Brokers and cannot forward messages appropriately.

You might have unconnected clouds because:

  • The clouds are not properly configured.
  • The clouds are intentionally configured this way, perhaps for increased security.

Suppose a client accesses two StarTeam Server configurations. Suppose that each server configuration uses a different Message Broker, and that these two Message Brokers are in unconnected clouds (see figure below). In this case, if the client chooses an MPX profile that specifies Message Broker 1 when it opens Project 1, the client receives messages for only the StarTeam Server configuration in the first cloud. The client treats the StarTeam Server configuration in the second cloud as if it did not support ActiveMQ MPX. The client performs all functions properly for such “disjoint” StarTeam Server configurations, but it does not receive the performance and instant notification benefits provided by ActiveMQ MPX.

Back to top